<div class="modal-header">
    <button type="button" class="close" ng-click="$dismiss()">&times;</button>
    <h3 class="modal-title">{{title}}</h3>
</div>
<div class="modal-body">
    <form name="registerForm" novalidate>

        <div class="form-group">
            <input name="email" type="email" class="form-control" data-ng-model="email"
                   ng-enter="register()" focus="displayForm" placeholder="你的常用邮箱" maxlength="30" required
                   autocomplete="off"/>
            <div class="validation-error-message"
                 ng-show="registerForm.email.$error.required && registerForm.email.$dirty">邮箱不能为空
            </div>
            <div class="validation-error-message"
                 ng-show="registerForm.email.$error.email && registerForm.email.$dirty">邮箱格式不正确
            </div>
        </div>
        <div class="form-group">
            <input name="userName" type="text" class="form-control" data-ng-model="userName"
                   ng-enter="register()" placeholder="你的用户名" maxlength="20" minlength="4" required
                   autocomplete="off"
                   ng-pattern="/^\w+$/"/>
            <div class="validation-error-message"
                 ng-show="registerForm.userName.$error.required&& registerForm.userName.$dirty">用户名不能为空
            </div>
            <div class="validation-error-message"
                 ng-show="registerForm.userName.$error.minlength && registerForm.userName.$dirty">
                用户名至少包含4个字符
            </div>
            <div class="validation-error-message"
                 ng-show="registerForm.userName.$error.pattern && registerForm.userName.$dirty">用户名只能包含数字、字母以及下划线
            </div>

        </div>
        <div class="form-group">
            <input name="password" type="password" class="form-control" data-ng-model="password"
                   ng-enter="register()" placeholder="密码" ng-minlength="6" maxlength="20" required
                   ng-pattern="/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&*]+$)(?![\d!@#$%^&*]+$)[a-zA-Z\d!@#$%^&*]+$/"/>
            <div class="validation-error-message"
                 ng-show="registerForm.password.$error.required && registerForm.password.$dirty">密码不能为空
            </div>
            <div class="validation-error-message"
                 ng-show="registerForm.password.$error.pattern && registerForm.password.$dirty">
                密码必须含有数字、字母以及特殊字符
            </div>
            <div class="validation-error-message"
                 ng-show="registerForm.password.$error.minlength && registerForm.password.$dirty">
                密码至少6个字符
            </div>
        </div>
    </form>
</div>
<div class="modal-footer" ng-enter="register()">
    <button class="btn btn-primary" type="submit" ng-click="register()"
            ng-disabled="registerForm.$invalid||isDisableRegisterButton">{{registerButtonText}}
    </button>
</div>
